package test;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import lombok.Data;

import java.util.List;

/**
 * @author wangbin
 */
@Data
@XStreamAlias("menu_code")
public class MenuCode {
    @XStreamAsAttribute
    private String name;
    @XStreamAsAttribute
    private Page page;

    @Data
    public static class Page {
        @XStreamImplicit(itemFieldName = "perm")
        private List<Perm> perm;

        @Data
        public static class Perm {
            @XStreamAsAttribute
            private String desc;
            @XStreamImplicit(itemFieldName = "perm")
            private List<Perm> perm;

        }
    }
}
